<?php
$server = '127.0.0.1';
$user = 'root';
$pass = '1024';
$db = 'mdb';

$link = mysql_connect($server,$user,$pass);
    if (!$link) {
        die(' Connection to database is unresponsive ');
    }
mysql_close($link);

$db_link = mysql_select_db($db);
    if (!$link) {
        die(' Database does not exist ');
    }
?>
